<template>
	<div class="addquestionnaire_body" id="app">
		<div class="tabSwitch">
			<!-- switchOn -->
			<nav :class="currentIndex == index ? 'switchOn': ''" v-for="(item,index) in questionData" :key="index" @click="switchClick(item.name,index)">{{item.name}}</nav>
			<nav class="determine" @click="determine">判定</nav>
		</div>

		<!-- 选题类型 -->
		<div class="topicType">
			<div class="gntleTemperament">
				<div class="title" v-for="(item,index) in questionArr" :key="index">
					<div>
						<p>{{item.title && item.title}}</p>
						<div class="answer">
							<div  @click="selectedTitle(aitem,item)" :class="['normal',aitem.checked?'checkedCurrent':'',aitem.checked2?'checkedCurrent2':'']" v-for="(aitem,aindex) in item.options"  :key="aindex">
								<span :class="[aitem.checked ? 'checkedTitle' : '',aitem.checked2 ? 'checkedTitle2' :'' ]">{{aitem.userOption}}</span>
								<i>{{aitem.title && aitem.title}}</i>
							</div>
						</div>
					</div>
				</div>
			</div>

			<!-- 上一页下一页 -->
			<div class="previousPage" @click="prevPage">
				<img src="../../../static/img/questionnaire/left@2x.png" alt="" class="left">
			</div>
			<div class="nextPage" @click="nextPage">
				<img src="../../../static/img/questionnaire/right@2x.png" alt="" class="right">
			</div>
		</div>
		<u-modal v-model="showModal" :show-cancel-button="true" @confirm="Modalconfirm" :content="showContent"></u-modal>
	</div>
</template>

<script src="@/static/js/monitor/tcm/addquestionnaire.js"></script>

<style lang="scss" scoped>
	@import '@/static/css/monitor/tcm/addquestionnaire.scss';
</style>
